package com.example.shop.persistence.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

/**
 * <p>
 * 运费表
 * </p>
 *
 * @author jason
 * @since 2021-01-15
 */
@TableName("shop_freight")
public class Freight extends Model<Freight> {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 省份
     */
    @ApiModelProperty(value="省份")
    private String province;

    /**
     * 单位运费（1公斤或1立方米所需运费）
     */
    @ApiModelProperty(value="单位运费")
    private Integer freight;

    /**
     * 区域ID
     */
    @ApiModelProperty(value="区域ID")
    @TableField("areaID")
    private Integer areaID;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public Integer getFreight() {
        return freight;
    }

    public void setFreight(Integer freight) {
        this.freight = freight;
    }

    public Integer getAreaID() {
        return areaID;
    }

    public void setAreaID(Integer areaID) {
        this.areaID = areaID;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Freight{" +
                "id=" + id +
                ", province=" + province +
                ", freight=" + freight +
                ", areaID=" + areaID +
                "}";
    }
}
